﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TridiagonalMatrix
{
    class Program
    {
        static void Main(string[] args)
        {
            //double[] x = { 1, 8, 9, 10};
            //double[] y = { 6, 7, 3, 8};
            double[] x = { 3, 4.5, 7, 9};
            double[] y = { 2.5, 1, 2.5, 0.5};
            var cubic = new CubicSplineInterpolation(x, y);
            //var p1 = cubic.Interpolate(0);
            //Console.WriteLine("0 - " + p1);
            var p1 = cubic.Interpolate(5);
            Console.WriteLine("5 - " + p1);
            p1 = cubic.Interpolate(8);
            Console.WriteLine("8 - " + p1);
            //5 - 1.1028897338403
            //8 - 1.88326996197719
        }
    }
}
